Optimal. Leaf size=93 \[ -\frac{a \cot ^5(c+d x)}{5 d}+\frac{a \cot ^3(c+d x)}{3 d}-\frac{a \cot (c+d x)}{d}-a x-\frac{b \cot ^4(c+d x)}{4 d}+\frac{b \cot ^2(c+d x)}{2 d}+\frac{b \log (\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.121125, antiderivative size = 93, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {3529, 3531, 3475} \[ -\frac{a \cot ^5(c+d x)}{5 d}+\frac{a \cot ^3(c+d x)}{3 d}-\frac{a \cot (c+d x)}{d}-a x-\frac{b \cot ^4(c+d x)}{4 d}+\frac{b \cot ^2(c+d x)}{2 d}+\frac{b \log (\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3529
Rule 3531
Rule 3475
Rubi steps
\begin{align*} \int \cot ^6(c+d x) (a+b \tan (c+d x)) \, dx &=-\frac{a \cot ^5(c+d x)}{5 d}+\int \cot ^5(c+d x) (b-a \tan (c+d x)) \, dx\\ &=-\frac{b \cot ^4(c+d x)}{4 d}-\frac{a \cot ^5(c+d x)}{5 d}+\int \cot ^4(c+d x) (-a-b \tan (c+d x)) \, dx\\ &=\frac{a \cot ^3(c+d x)}{3 d}-\frac{b \cot ^4(c+d x)}{4 d}-\frac{a \cot ^5(c+d x)}{5 d}+\int \cot ^3(c+d x) (-b+a \tan (c+d x)) \, dx\\ &=\frac{b \cot ^2(c+d x)}{2 d}+\frac{a \cot ^3(c+d x)}{3 d}-\frac{b \cot ^4(c+d x)}{4 d}-\frac{a \cot ^5(c+d x)}{5 d}+\int \cot ^2(c+d x) (a+b \tan (c+d x)) \, dx\\ &=-\frac{a \cot (c+d x)}{d}+\frac{b \cot ^2(c+d x)}{2 d}+\frac{a \cot ^3(c+d x)}{3 d}-\frac{b \cot ^4(c+d x)}{4 d}-\frac{a \cot ^5(c+d x)}{5 d}+\int \cot (c+d x) (b-a \tan (c+d x)) \, dx\\ &=-a x-\frac{a \cot (c+d x)}{d}+\frac{b \cot ^2(c+d x)}{2 d}+\frac{a \cot ^3(c+d x)}{3 d}-\frac{b \cot ^4(c+d x)}{4 d}-\frac{a \cot ^5(c+d x)}{5 d}+b \int \cot (c+d x) \, dx\\ &=-a x-\frac{a \cot (c+d x)}{d}+\frac{b \cot ^2(c+d x)}{2 d}+\frac{a \cot ^3(c+d x)}{3 d}-\frac{b \cot ^4(c+d x)}{4 d}-\frac{a \cot ^5(c+d x)}{5 d}+\frac{b \log (\sin (c+d x))}{d}\\ \end{align*}
Mathematica [C] time = 0.354815, size = 82, normalized size = 0.88 \[ \frac{b \left (-\cot ^4(c+d x)+2 \cot ^2(c+d x)+4 \log (\tan (c+d x))+4 \log (\cos (c+d x))\right )}{4 d}-\frac{a \cot ^5(c+d x) \, _2F_1\left (-\frac{5}{2},1;-\frac{3}{2};-\tan ^2(c+d x)\right )}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.039, size = 93, normalized size = 1. \begin{align*} -{\frac{b \left ( \cot \left ( dx+c \right ) \right ) ^{4}}{4\,d}}+{\frac{b \left ( \cot \left ( dx+c \right ) \right ) ^{2}}{2\,d}}+{\frac{b\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}-{\frac{a \left ( \cot \left ( dx+c \right ) \right ) ^{5}}{5\,d}}+{\frac{a \left ( \cot \left ( dx+c \right ) \right ) ^{3}}{3\,d}}-{\frac{\cot \left ( dx+c \right ) a}{d}}-ax-{\frac{ac}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.59924, size = 126, normalized size = 1.35 \begin{align*} -\frac{60 \,{\left (d x + c\right )} a + 30 \, b \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 60 \, b \log \left (\tan \left (d x + c\right )\right ) + \frac{60 \, a \tan \left (d x + c\right )^{4} - 30 \, b \tan \left (d x + c\right )^{3} - 20 \, a \tan \left (d x + c\right )^{2} + 15 \, b \tan \left (d x + c\right ) + 12 \, a}{\tan \left (d x + c\right )^{5}}}{60 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.82352, size = 293, normalized size = 3.15 \begin{align*} \frac{30 \, b \log \left (\frac{\tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{2} + 1}\right ) \tan \left (d x + c\right )^{5} - 15 \,{\left (4 \, a d x - 3 \, b\right )} \tan \left (d x + c\right )^{5} - 60 \, a \tan \left (d x + c\right )^{4} + 30 \, b \tan \left (d x + c\right )^{3} + 20 \, a \tan \left (d x + c\right )^{2} - 15 \, b \tan \left (d x + c\right ) - 12 \, a}{60 \, d \tan \left (d x + c\right )^{5}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 9.52609, size = 124, normalized size = 1.33 \begin{align*} \begin{cases} \tilde{\infty } a x & \text{for}\: \left (c = 0 \vee c = - d x\right ) \wedge \left (c = - d x \vee d = 0\right ) \\x \left (a + b \tan{\left (c \right )}\right ) \cot ^{6}{\left (c \right )} & \text{for}\: d = 0 \\- a x - \frac{a}{d \tan{\left (c + d x \right )}} + \frac{a}{3 d \tan ^{3}{\left (c + d x \right )}} - \frac{a}{5 d \tan ^{5}{\left (c + d x \right )}} - \frac{b \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac{b \log{\left (\tan{\left (c + d x \right )} \right )}}{d} + \frac{b}{2 d \tan ^{2}{\left (c + d x \right )}} - \frac{b}{4 d \tan ^{4}{\left (c + d x \right )}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.33034, size = 267, normalized size = 2.87 \begin{align*} \frac{6 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 15 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 70 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 180 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 960 \,{\left (d x + c\right )} a - 960 \, b \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right ) + 960 \, b \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) + 660 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \frac{2192 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 660 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 180 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 70 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 15 \, b \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 6 \, a}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5}}}{960 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]